package com.work.chat.common.eums;

/**
 * 状态码定义约束
 */
public enum BizCodeEnum {

    /**
     * Http request
     */
    SUCCESS(200,"请求成功"),
    FAIL(400, "请求错误"),
    NOT_TOKEN_ERROR(400,"未携带TOKEN,请登录!"),
    TOKEN_ERROR(400,"TOKEN异常"),
    JWT_TOKEN_ERROR(400,"TOKEN解析异常"),
    NOT_USERNAME_ERROR(400,"用户名不存在"),
    USER_ERROR(400,"用户异常,请联系管理员!"),
    PASSWORD_ERROR(400,"密码错误!"),
    SERVER_INTERNAL_ERROR(500, "服务器内部错误"),




    /**
     * 系统相关
     */
    REQUEST_PARAMS_ERROR(400, "请求参数异常"),
    REQUEST_HEADERS_PARAMS_ERROR(400, "请求头必选参数有空值"),
    OUTER_INTERFACES(500, "外部接口异常"),
    /**
     * 账号
     */

    /**
     * 文件相关
     */
    FILE_UPLOAD_FAIL(500, "文件上传失败");


    int code;
    String message;

    BizCodeEnum(int code, String massage) {
        this.code = code;
        this.message = massage;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

}